package com.jiezuo.auth.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jiezuo.auth.entity.PositionGroup;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

/**
* @description   岗位组
* @author        庞留杰
* @date          2024/03/12 14:51
* @version       V1.0
**/
public interface PositionGroupMapper extends BaseMapper<PositionGroup>{

    @Select("SELECT GROUP_CONCAT(sp.name) FROM sys_position sp WHERE FIND_IN_SET(sp.id,(SELECT spg.position FROM sys_position_group spg WHERE spg.id=#{id})) ")
    String findAllPositionById(@Param("id") String id);

}
